<?php 
class Message{
	
	private $idMessage;
	private $titre;
	private $editeur;
	private $contenu;
	private $etendu;
	private $typeMessage;
	private $date;
    function __construct($idMessage){
 		$this->idMessage=$idMessage;
 		$query="select * from messages where id_message='$idMessage'";
 		$result=runQuery($query);
		$row=mysql_fetch_assoc($result);
		$this->titre=$row['nom_mess'];
		$this->editeur=$row['membres_id_membre'];
		$this->contenu=$row['commentaire_mess'];
		$this->etendu=$row['etendue'];
		$this->typeMessage=$row['message_types_idmessage_types'];
		$this->date=$row['date_mess'];
    }
 	function __destruct(){
	}
	
	public function getIdMessage(){return $this->idMessage;}
	public function getTitre(){return $this->titre;}
	public function getEditeur(){return $this->editeur;}
	public function getContenu(){return $this->contenu;}
	public function getEtendu(){return $this->etendu;}
	public function getTypeMessage(){return $this->typeMessage;}
	public function getDate(){return $this->date;}
	
// setter
	public function setIdMessage(){
		
	}
	public function setTitre(){
		
	}
	public function setEditeur(){
		
	}
	public function setContenu(){
		
	}
	public function setEtendu(){
		
	}
	public function setTypeMessage(){
		
	}
	
}